home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 482 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: hearst.acc.Virginia.EDU!adastra!mbs
  2. Newsgroups: comp.sys.amiga.programmer
  3. From: mbs@adastra.cvl.va.us (Michael B. Smith)
  4. Subject: Re: AS225 daemon launch?
  5. References:  <19960106.7CB5338.12AAC@sdcc8.ucsd.edu>
  6. X-NewsReader: GRn 3.0b24 December 30, 1995
  7. MIME-Version: 1.0
  8. Content-Type: text/plain; charset=iso-8859-1
  9. Content-Transfer-Encoding: 8bit
  10. Message-ID: <mbs.46wn@adastra.cvl.va.us>
  11. Date: Mon, 8 Jan 96 08:35:48 EDT
  12. Organization: Only if you insist...
  13.  
  14. In article <19960106.7CB5338.12AAC@sdcc8.ucsd.edu> jfriesne@sdcc8.ucsd.edu (Jeremy Friesner) writes:
  15. > How can a server program know, for sure, that it was launched by the AS225
  16. > inetd daemon, vs. being launched from a CLI?    The command-line-arguments
  17. > that inetd provides give a hint, but they could be faked, etc.
  18.  
  19. socket.library makes 3 validation checks on the socket pointer
  20. before allowing s_inherit() to succeed. It's not infallible, but
  21. it's very unlikely that you'll be able to pick a correct value
  22. to "fool" s_inherit().
  23.  
  24. If your question is more along the line of "how does a program
  25. know that it's being called from inetd, and not another program
  26. that is pretending to be inetd"; well, it doesn't.
  27. --
  28.   //   Michael B. Smith
  29. \X/    mbs@adastra.cvl.va.us
  30.